
<template>
  <div class="zhanNeiRYDLCK approve el-card is-always-shadow el-card__body">
    <el-dialog
      title="预览"
      :visible.sync="dialogVisible"
      @close="closed"
      width="950px">
      <avue-form v-if="isReload" class="shouPiaoYuanCYQRTZForm" :option="option" v-model="formData" @submit="handleSubmit">

        <template slot-scope="scope" slot="stationCode">
          <span>{{getStationName('9',scope.value)}}</span>
        </template>
        <template slot-scope="scope" slot="tvmCode">
          <span>{{scope.value}}</span>
        </template>
        <template slot-scope="scope" slot="recordTime">
          <span>{{moment(scope.value).format('YYYY-MM-DD')}}</span>
        </template>
        <template slot-scope="scope" slot="conductorPersonName">
          <span>{{scope.value}}</span>
        </template>
        <template slot-scope="scope" slot="conductorPersonCode">
          <span>{{scope.value}}</span>
        </template>
        <template slot-scope="scope" slot="differenceAmount">
          <span>{{fenExYuangettoFixed(scope,'value')}}</span>
        </template>

        <template slot-scope="scope" slot="menuForm">
          <el-button type="default" @click="closed">取消</el-button>
        </template>
      </avue-form>
    </el-dialog>
  </div>
</template>


<script>
import {
  fenExYuangettoFixed, getStationName
} from "@/api/subwayRat/commonCheck";
import moment from 'moment';
export default {
  components:{
  },
  data() {
    return {
      isReload:true,
      //1期限内，2期限外
      showType:1,
      dialogVisible:true,
      lineCodes:[],
      selectedKeys:[],
      stationCodes:[],
      conductorPersonNames:[],//售票员名称
      operationCodes:[],
      headers:{},
      formData:{
        dynamic: []
      },
      option:{
      },
      parentThis:null
    }
  },
  created() {
  },
  methods: {
    getStationName,
    moment,
    fenExYuangettoFixed,
    handleSubmit(auditSate){
      this.closed();
    },
    recallShow(row,parentThis){
      this.parentThis=parentThis;
      this.formData=row;
      this.showType = row.appealType;
      this.getOption();
    },
    closed(){
      this.dialogVisible=false;
      this.$parent.prevDialogVisible=false;
    },
    getOption(){
      let th=this;
      this.option=this.getAddOption(th);
      this.isReload=false;
      this.$nextTick(()=>{
        this.isReload=true;
      })
    },

    getAddOption(th) {
      return {
        submitBtn:false,
        emptyBtn:false,
        group:[
          {
            icon:'',
            label: '',
            // collapse:false,
            prop: 'group1',
            column: [
              {
                label: '站点',
                width: 130,
                prop: 'stationCode',
                type: 'select',
                formatter: function(row, value , label, column){
                  return getStationName(row.lineCode,value);
                },
                labelWidth:130,
                formslot:true,
              },
              {
                label: 'TVM编号',
                prop: 'tvmCode',
                labelWidth:130,
                formslot:true,
              },
              {
              label: '售票员',
              prop: 'conductorPersonName',
              labelWidth:130,
              formslot:true,
              type:'select'
            },{
              label: '售票员工号',
              prop: 'conductorPersonCode',
              labelWidth:130,
              formslot:true,
              type:'select'
            },{
              label: '收入日期',
              prop: 'recordTime',
              // width:'250',
              labelWidth:130,
              type:"yyyy-MM-dd",
              formslot:true,
            },{
              label: '差异金额',
              prop: 'differenceAmount',
              labelWidth:130,
              type:'input',
              formslot:true,
            },{
              label: '车站申诉原因',
              prop: 'appealReason',
              autoHeight: true,
              // width:'250',
              labelWidth:130,
              type:'textarea',
              disabled:true,
            },
              //   {
              //   label: '超期申诉原因',
              //   prop: 'overtimeReason',
              //   // width:'250',
              //   labelWidth:130,
              //   hide:true,
              //   type:'textarea',
              //   disabled:true,
              // }
              {
                label: '车站备注',
                prop: 'remark',
                autoHeight: true,
                // width:'250',
                labelWidth:130,
                type:'textarea',
                disabled:true,
              },{
                label: '申诉收益回复',
                prop: 'appealReply',
                // width:'250',
                labelWidth:130,
                type:'textarea',
                disabled:true,
              },{
                label: '站长审核意见',
                prop: 'auditStationOpinion',
                // width:'250',
                labelWidth:130,
                type:'textarea',
                disabled:true,
              },{
                label: '车间票务专业审核意见',
                prop: 'auditWorkshopOpinion',
                // width:'250',
                labelWidth:130,
                type:'textarea',
                disabled:true,
              },{
                label: '部门票务专业审核意见',
                prop: 'auditDeptOpinion',
                // width:'250',
                labelWidth:130,
                type:'textarea',
                disabled:true,
              },
              // {
              //   label: '差异原因',
              //   prop: 'overtimeReason',
              //   // width:'250',
              //   labelWidth:130,
              //   type:'textarea',
              //   disabled:true,
              // }
            ]
          },
        ]
      };
    }
  },
  mounted() {
  }
}
</script>
<style lang="scss">
.huLianWangShouPiaojiDataInput.EditorOrAdd{
  .avue-group[index='2']{
    .avue-form__group{
      .avue-form__row{
        width: 100%;
      }
    }
  }
  @media only screen and (min-width: 992px){
    width: 100%;
  }
  .avue-crud__tip{
    display: none;
  }
}
.zhanNeiRYDLCK {
  .upload-fujian{
    display: inline-flex;
    .el-upload-list {
      display: none;
    }
  }

}
</style>
